//
//  MyWebViewController.m
//  YXFinance
//
//  Created by uplooking on 2018/10/24.
//  Copyright © 2018年 CRLong. All rights reserved.
//

#import "MyWebViewController.h"

@interface MyWebViewController ()

@end

@implementation MyWebViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self setBackLeftBarButtonItemAction:@selector(backAction:)];
    [self initView];
}

- (void)backAction:(UIButton *)sender{
    
    if (_isWeb) {
        
        [self.navigationController popViewControllerAnimated:YES];
        
    }else{
       
        [self.navigationController popToRootViewControllerAnimated:YES];
    }
 
}

- (void)initView{
    
    WKWebView * webView = [[WKWebView alloc] init];
    NSMutableURLRequest *request =[NSMutableURLRequest requestWithURL:[NSURL URLWithString:_url]];
    [webView.scrollView setShowsVerticalScrollIndicator:NO];
    [webView loadRequest:request];
    [self.view addSubview:webView];
    [webView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(self.view);
    }];
    
}


@end
